<?php
	require_once('includes/config.php');
	include('templates/header.php'); 
?>

	<body class="sans-serifsans-serif teste center">
 		  <div class="fullwrap selectmenu">
				<?php 
					include('templates/topbar.php'); 
					include('templates/logo.php'); 
				?>
                <!-- Nav Wrapper -->
				<div id="navwrap">
                    <div class="container center">
                        <div class="row">
                            <div class="inner">
                                <div id="navWrapper">
                                    <?php 
										include('templates/navbar.php');
										include('templates/searchbox.php');
									?>
								</div>
                            </div>	
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
				<!-- Nav Wrapper -->		
				<!-- Banner wrapper -->
				<div id="bannerwrap">
					<div class="container center">
						<div class="row">
							<div class="inner">
								<?php 
								if(!isset($_GET['act']) && !isset($_GET['mod']))
								{ 
									include('templates/slider.php');
								}
								?>								
                            </div>
                        </div>
                    </div>
                </div>
				<!-- Banner wrapper -->
				<!-- First Row Grid -->
                <div id="grid1wrap">
                    <div class="container center">
                        <div class="row">
                            <div class="inner">
                                <div class="grid1wrap">
                                    <div id="grid1" class="grid_twelve">
                                        <div class="moduletable">	
                                            <?php 
                                            if(isset($_GET['act']))
                                            {
                                                switch($_GET['act'])
                                                {
                                                    case 'detail':
                                                        include('templates/product_detail.php');
                                                        break;
                                                    case 'ndetail':
                                                        include('templates/news_detail.php');
                                                        break;
                                                    default:
                                                        include('templates/product.php');
                                                        break;
                                                }
                                            }
                                            else
                                            {
                                                switch($_GET['mod'])
                                                {
                                                    case 'news':
                                                        include('templates/news.php');
                                                        break;
                                                    case 'product':
                                                        include('templates/load_product.php');
                                                        break;
													case 'search':
														include('templates/search.php');
														break;
													case 'contact':
														include('templates/contact.php');
														break;
													case 'views':
														include('templates/category.php');
														break;
													case 'tos':
														include('templates/tos.php');
														break;
                                                    default:
                                                        include('templates/load_product.php');
                                                        break;
                                                }
                                            }
                                             ?>				
                                        </div>		
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
				<!-- First Grid -->
				<!-- Sixth Row Grid -->
				<div id="grid6wrap">
					<div class="container center">
						<div class="row" style="height:35px;">
							<div class="inner">
								<?php include('templates/social.php'); ?>
							</div>
						</div>
					</div>
				</div>
				<!-- Sixth Row Grid -->
                <div id="bottomrow">
                    <!-- Bottom Row bottom - Facebook Like script -->
                    <div id="fb-root"></div>
					<script>(function(d, s, id) {
                      var js, fjs = d.getElementsByTagName(s)[0];
                      if (d.getElementById(id)) return;
                      js = d.createElement(s); js.id = id;
                      js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
                      fjs.parentNode.insertBefore(js, fjs);
                    }(document, 'script', 'facebook-jssdk'));</script>
                </div>
                <script type="text/javascript">
				// Sticky Nav
				jQuery(window).scroll(function(e){ 
				    jQueryel = jQuery("#navwrap"); // element you want to scroll
				    jQueryscrolling = 0; // Position you want element to assume during scroll
				    jQuerybounds = 200; // boundary of when to change element to fixed and scroll

				    if (jQuery(this).scrollTop() > jQuerybounds && jQueryel.css("position") != "fixed"){ 
				        jQuery(jQueryel).css({"position": "fixed", "top": jQueryscrolling,"display": "none"}).addClass("sticky").fadeIn("slow"); 
				    } 
				    if (jQuery(this).scrollTop() < jQuerybounds && jQueryel.css("position") != "absolute"){ 
				        jQuery(jQueryel).css({"position": "relative", "top": "0px"}).removeClass("sticky"); 
				    } 

				});
			</script>
       			 <!-- Bottom Row bottom - Facebook Like script -->
    
                <div id="footerwrap"><!-- Container -->
                    <?php echo $getSetting['cpy']; ?>
                </div>
			</div>
	</body>
</html>